Method and apparatus for semi-automatic finger extraction

ABSTRACT

An image processing device includes: an inputting unit for performing a click on an object image contained in an image to obtain a clicked point; a calculating unit for calculating an edge map of the image; an estimating unit for estimating a color model of the object image based on the clicked point and the edge map; an object classifying unit for classifying each pixel in the image, based on the edge map and the color model, so as to obtain a binary image of the image; and a detecting unit for detecting a region containing the object image based on the binary image. The image processing device and method according to the present disclosure can improve the accuracy of detecting the boundary of an object image such as a finger image, thus facilitating removal of the object image from the image and making the processed image more nice-looking.

FIELD OF THE INVENTION

The present disclosure relates to the field of image processing,particularly to a device and a method for detecting the boundary of anobject image such as a finger image.

BACKGROUND OF THE INVENTION

This section provides background information relating to the presentdisclosure, which is not necessarily prior art.

When scanning a book using an overhead scanner, for example, the usermay hold both sides of the book with his/her fingers to complete thescanning process. The fingers may appear on the side boundaries of thebook in the corrected scanned image of the book, making the correctedimage less nice-looking. Therefore, it is necessary to remove the fingerimage in the corrected image.

In order to remove the finger image, generally two steps are to betaken: first, detecting the finger region; and secondly, removing thefinger region. Clearly, automatic finger region detection and removalare useful. However, considering the variety of types of book contentsand the possibility that the fingers may get to the book content, it isdifficult to correctly detect the finger region.

SUMMARY OF THE INVENTION

This section provides a general summary of the present disclosure, andis not a comprehensive disclosure of its full scope or all of itsfeatures.

An object of the present disclosure is to provide an image processingdevice and an image processing method, which can improve the accuracy ofdetecting the boundary of an object image such as a finger image, thusfacilitating removal of the object image from the image and making theprocessed image more nice-looking.

According to an aspect of the present disclosure, there is provided animage processing device including: an inputting unit for performing aclick on an object image contained in an image to obtain a clickedpoint; a calculating unit for calculating an edge map of the image; anestimating unit for estimating a color model of the object image basedon the clicked point and the edge map; an object classifying unit forclassifying each pixel in the image, based on the edge map and the colormodel, so as to obtain a binary image of the image; and a detecting unitfor detecting a region containing the object image based on the binaryimage.

According to another aspect of the present disclosure, there is providedan image processing method including: performing a click on an objectimage contained in an image to obtain a clicked point; calculating anedge map of the image; estimating a color model of the object imagebased on the clicked point and the edge map; classifying each pixel inthe image, based on the edge map and the color model, so as to obtain abinary image of the image; and detecting a region containing the objectimage based on the binary image.

According to another aspect of the present disclosure, there is provideda program product including machine-readable instruction code storedtherein which, when read and executed by a computer, causes the computerto perform the image processing method according to the presentdisclosure.

According to another aspect of the present disclosure, there is provideda machine-readable storage medium carrying the program product accordingto the present disclosure thereon.

The image processing device and method according to the presentdisclosure require user interaction to obtain information on the clickedpoint. Further, the image processing device and method according to thepresent disclosure use color information and edge information to detectthe boundary of an object image such as a finger image. Accordingly, theimage processing device and method according to the present disclosurecan improve the accuracy of detecting the boundary of an object image,thus facilitating removal of the object image from the image and makingthe processed image more nice-looking.

Further areas of applicability will become apparent from the descriptionprovided herein. The description and specific examples in this summaryare intended for purposes of illustration only and are not intended tolimit the scope of the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The drawings described herein are for illustrative purposes only ofselected embodiments and not all possible implementations, and are notintended to limit the scope of the present disclosure. In the drawings:

FIGS. 1(a) and 1(b) are schematic diagrams illustrating an exemplaryimage to be dealt with by the technical solution of the presentdisclosure;

FIG. 2 is a block diagram illustrating an image processing deviceaccording to an embodiment of the present disclosure;

FIG. 3 is a schematic diagram illustrating an exemplary application ofthe image processing device according to the embodiment of the presentdisclosure;

FIG. 4 is a block diagram illustrating a calculating unit in the imageprocessing device according to the embodiment of the present disclosure;

FIG. 5 is a block diagram illustrating an estimating unit in the imageprocessing device according to the embodiment of the present disclosure;

FIGS. 6(a) to 6(d) are schematic diagrams illustrating an exemplaryapplication of an extension region acquiring unit in the estimating unitin the image processing device according to the embodiment of thepresent disclosure;

FIG. 7 is a block diagram illustrating a detecting unit in the imageprocessing device according to the embodiment of the present disclosure;

FIGS. 8(a) to 8(d) are schematic diagrams illustrating an exemplaryapplication of the detecting unit in the image processing deviceaccording to the embodiment of the present disclosure;

FIG. 9 is a schematic diagram illustrating an exemplary application ofan expanding unit in the detecting unit in the image processing deviceaccording to the embodiment of the present disclosure;

FIG. 10 is a flowchart of an image processing method according to anembodiment of the present disclosure; and

FIG. 11 is a block diagram illustrating an exemplary structure of ageneral-purpose personal computer on which the image processing deviceand method according to the embodiments of the present disclosure can beimplemented.

While the present disclosure is susceptible to various modifications andalternative forms, specific embodiments thereof have been shown by wayof example in the drawings and are herein described in detail. It shouldbe understood, however, that the description herein of specificembodiments is not intended to limit the present disclosure to theparticular forms disclosed, but on the contrary, the intention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the present disclosure. Note that correspondingreference numerals indicate corresponding parts throughout the severalviews of the drawings.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Examples of the present disclosure will now be described more fully withreference to the accompanying drawings. The following description ismerely exemplary in nature and is not intended to limit the presentdisclosure, application, or uses.

Example embodiments are provided so that this disclosure will bethorough, and will fully convey the scope to those who are skilled inthe art. Numerous specific details are set forth such as examples ofspecific components, devices, and methods, to provide a thoroughunderstanding of embodiments of the present disclosure. It will beapparent to those skilled in the art that specific details need not beemployed, that example embodiments may be embodied in many differentforms and that neither should be construed to limit the scope of thedisclosure. In some example embodiments, well-known processes,well-known device structures, and well-known technologies are notdescribed in detail.

FIGS. 1(a) and 1(b) are schematic diagrams illustrating an exemplaryimage to be dealt with by the technical solution of the presentdisclosure. When scanning a book B using an overhead scanner, forexample, the user may hold both sides of the book with the fingers ofhis/her left hand LH and right hand RH to complete the scanning process,thus obtaining an image as shown in FIG. 1(a). Known methods in theprior art may be used to correct the obtained image. For example, theupper and lower boundaries of the image may be extracted, and thentransformed from curved into flat so as to obtain the corrected image.FIG. 1(b) shows an example of the corrected image. As shown in FIG.1(b), in the corrected scanned image of the book, a finger image F mayappear on the side boundaries of book, and the finger image F may get tobook content T, making the corrected image less nice-looking. Therefore,it is necessary to remove the finger image F from the corrected image.

In order to remove the finger image F, generally two steps are to betaken: first, detecting the finger region; and secondly, removing thefinger region. By using the technical solution of the presentdisclosure, the accuracy of detecting the finger region as shown in FIG.1(b) can be improved, thus facilitating removal of the finger region andmaking the corrected scanned image of the book more nice-looking.

As shown in FIG. 2, the image processing device 200 according to anembodiment of the present disclosure may include an inputting unit 210,a calculating unit 220, an estimating unit 230, an object classifyingunit 240, and a detecting unit 250.

The inputting unit 210 may click on an object image contained in animage to obtain a clicked point. For example, as shown in the left ofFIG. 3, on an image I cropped from the corrected image containing thefinger image F, the inputting unit 210 may perform a click on the fingerimage F to obtain a clicked point P. In this way, it is clear that theclicked point P is within the finger region. The inputting unit 210 maybe any device that can perform click function, e.g. a mouse, and thepresent disclosure has no particular limitations thereto.

The calculating unit 220 may calculate an edge map of the image I. Theedge map is a map in relation to edge information of the image I. Theedge information indicates whether a pixel in the image I is an edgepixel or not. The calculating unit 220 may calculate the edge map basedon pixel information of the image I and information of the clicked pointP obtained by the inputting unit 210, or calculate the edge map based onthe pixel information of the image I only. This will be described laterin detail.

The estimating unit 230 may estimate a color model of the finger image(object image) F based on the clicked point P obtained by the inputtingunit 210 and the edge map calculated by the calculating unit 220.

Further, the object classifying unit 240 may classify each pixel in theimage I, based on the edge map calculated by the calculating unit 220and the color model estimated by the estimating unit 230, so as toobtain a binary image of the image I. In the binary image, each pixel inthe image I is simply classified as a finger (object) pixel or anon-finger (non-object) pixel.

Further, the detecting unit 250 may detect a region containing thefinger image F based on the binary image obtained by the objectclassifying unit 240. Ideally, as shown in the right of FIG. 3, thefinger region represented with a shaded background may be obtained.

In the image processing device 200 according to the embodiment of thepresent disclosure, both the color model of the finger image and theedge map of the image are used to obtain the binary image of the image.Further, both the information on the clicked point and the edge map ofthe image are used to estimate the color model of the finger image.Therefore, the accuracy of detecting the finger region can be greatlyimproved, thus facilitating removal of the finger image from the imageand making the processed image more nice-looking.

In order to provide a better understanding of the technical solution ofthe present disclosure, the components of the image processing device200 shown in FIG. 2 are described below in more detail.

FIG. 4 is a block diagram illustrating a calculating unit 400 in theimage processing device according to the embodiment of the presentdisclosure. The calculating unit 400 shown in FIG. 4 corresponds to thecalculating unit 220 shown in FIG. 2.

The calculating unit 400 may include a distance calculating unit 410, adistance gradient calculating unit 420, and an edge classifying unit430.

The distance calculating unit 410 may calculate the distance between thecolor of each pixel in the image I (see FIG. 3) and the color of theclicked point P to obtain a distance map. The color of the clicked pointP may be the color of the pixel at the clicked point P, or may be anaverage color of pixels within a predetermined region containing theclicked point P.

Specifically, assuming that the width and height of the image I are w₀and h₀ respectively, the coordinates of the clicked point P in the imageI are (x_(click), y_(click)), and the color of the clicked point P isrepresented by color_(click)=(r_(click), g_(click), b_(click)), wherer_(click), g_(click) and b_(click) are R, G and B values of the color ofthe clicked point P, respectively. The distance calculating unit 410 maycalculate the distance between the color of each pixel (x_(i), y_(i)) inthe image I, color_(xi, yi), and the color of the clicked point P,color_(click), according to the equation (1):dist_(i,j)=|color_(xi,yi)−color_(click)|,1≦y _(i) ≦h ₀,1≦x _(i) ≦w₀  (1)

In this way, the distance map of the image I can be obtained.

Further, the distance gradient calculating unit 420 may apply a gradientoperator (e.g., Sobel operator) to the distance map obtained by thedistance calculating unit 410 to obtain a distance gradient imageGrad_(click). The methods for calculating a gradient image arewell-known in the prior art, and thus omitted herein.

Further, based on the distance gradient image Grad_(click) obtained bythe distance gradient calculating unit 420, the edge classifying unit430 may classify pixels having a distance gradient larger than apredetermined distance gradient threshold in the image I as edge pixels,and the other pixels in the image I as non-edge pixels, therebyobtaining an edge map of the image I. Particularly, the edge classifyingunit 430 may obtain the edge map of the image I according to theequation (2):

$\begin{matrix}{{{Edge}_{click}\left( {x_{i},y_{i}} \right)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu}{{Grad}_{click}\left( {x_{i},y_{i}} \right)}} > T_{click}} \\{255,} & {else}\end{matrix} \right.} & (2)\end{matrix}$where T_(click) denotes the predetermined distance gradient threshold,Grad_(click)(x_(i), y_(i)) denotes the distance gradient between a pixel(x_(i), y_(i)) and the clicked point P, and Edge_(click)(x_(i), y_(i))denotes edge information on whether the pixel (x_(i), y_(i)) is an edgepixel or a non-edge pixel. Specifically, the edge pixels are assignedwith the value 0, and the non-edge pixels are assigned with the value255. In this way, the calculating unit 400 obtains the edge map of theimage I.

According to a preferred embodiment of the present disclosure, thecalculating unit 400 may further include a gray converting unit 440 andan intensity gradient calculating unit 450. The gray converting unit 440may convert the image I from a color image into a gray image. Theintensity gradient calculating unit 450 may apply a gradient operator(e.g., Sobel operator) to the gray image to obtain an intensity gradientimage. The methods for converting a color image into a gray image andthe methods for calculating an intensity gradient image are well-knownin the prior art, and thus omitted herein.

In this case, the edge classifying unit 430 may classify pixels having adistance gradient larger than a predetermined distance gradientthreshold or having an intensity gradient larger than a predeterminedintensity gradient threshold in the image I as edge pixels, and theother pixels in the image I as non-edge pixels, based on the distancegradient image obtained by the distance gradient calculating unit 420and the intensity gradient image obtained by the intensity gradientcalculating unit 450, thus obtaining an enhanced edge map of the imageI. Particularly, the edge classifying unit 430 may obtain the enhancededge map of the image I according to the equation (3):

$\begin{matrix}{{{Edge}_{enhance}\left( {x_{i},y_{i}} \right)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu}{{Grad}_{click}\left( {x_{i},y_{i}} \right)}} > {T_{click}\mspace{14mu}{or}\mspace{14mu}{{Grad}_{intensity}\left( {x_{i},y_{i}} \right)}} > T_{intensity}} \\{255,} & {else}\end{matrix} \right.} & (3)\end{matrix}$where T_(intensity) denotes the predetermined intensity gradientthreshold, Grad_(intensity)(x_(i), y_(i)) denotes the intensity gradientof a pixel (x_(i), y_(i)), and Edge_(enhance)(x_(i), y_(i)) denotesenhanced edge information on whether the pixel (x_(i), y_(i)) is an edgepixel or a non-edge pixel. Specifically, the edge pixels are assignedwith the value 0, and the non-edge pixels are assigned with the value255. In this way, the calculating unit 400 obtains the enhanced edge mapof the image I.

Because the distance gradient image and intensity gradient image of theimage I are complementary to a certain degree, the calculating unit 400can detect the boundary of the finger image more completely by means ofthe information of both images.

It is noted that the calculating unit 400 may as well include only thegray converting unit 440, the intensity gradient calculating unit 450,and the edge classifying unit 430, without the distance calculating unit410 and the distance gradient calculating unit 420. In this case, theedge classifying unit 430 may classify pixels having an intensitygradient larger than a predetermined intensity gradient threshold in theimage I as edge pixels, and the other pixels in the image I as non-edgepixels, based on the intensity gradient image obtained by the intensitygradient calculating unit 450, thus obtaining the edge map of the imageI. In this case, the calculating unit 400 calculates the edge map basedon pixel information of the image I only, without using the informationon the clicked point P.

The estimating unit 500 in the image processing device according to theembodiment of the present disclosure is described below in conjunctionwith FIG. 5. The estimating unit 50 shown in FIG. 5 corresponds to theestimating unit 230 shown in FIG. 2.

The estimating unit 500 may include an extension region acquiring unit510 and a color model acquiring unit 520.

As shown in FIG. 6, for example, the extension region acquiring unit 510may acquire an extension region containing the clicked point P based onthe clicked point P and the edge map obtained by the calculating unit220 (400), the extension region being within the finger image F.Specifically, the shaded part in FIG. 6(d) represents the extensionregion.

Further, the color model acquiring unit 520 may acquire the color modelof the finger image F based on the color of each pixel within theextension region.

In order to obtain a stable and effective skin color model, generallymany samples (i.e., pixels) are needed; but the user clicks only onepoint (i.e., the clicked point) in the finger image. In this case, morepixels are needed to be obtained for estimating the skin color model.Therefore, it is necessary that the extension region acquiring unit 510acquires the extension region within the finger region F containing theclicked point P. Based on the color of each pixel within the extensionregion, instead of solely the color of the pixel at the clicked point P,the color model acquiring unit 520 can obtain a stable and effectivecolor model of the finger image F.

Specifically, the extension region acquiring unit 510 may include asetting unit 515 and searching units 511-514.

The setting unit 515 may set a maximum extension region E containing theclicked point P, represented with dotted lines in FIG. 6(b). Thesearching unit 511 may search for the first one of boundary pixelsleftward in a horizontal direction from the clicked point P, as a leftboundary pixel of the extension region; and the searching unit 522 maysearch for the first one of the boundary pixels rightward in thehorizontal direction from the clicked point P, as a right boundary pixelof the extension region.

For each reference pixel between the left boundary pixel and the rightboundary pixel in the horizontal direction, the searching unit 513 maysearch for the first one of the boundary pixels upward in a verticaldirection from the reference pixel, as an upper boundary pixel of theextension region; and the searching unit 514 may search for the firstone of the boundary pixels downward in the vertical direction from thereference pixel, as a lower boundary pixel of the extension region.

Specifically, the extension region acquiring unit 510 sets a slidingwindow by taking each pixel within the maximum extension region E as thecenter, counts the number of edge pixels in the sliding window, anddefines a pixel satisfying a condition that the number of the edgepixels in the sliding window is larger than a predetermined threshold asa boundary pixel.

Description is given in conjunction with FIGS. 6(a) to 6(c). Assumingthe ranges of x and y coordinates of the maximum extension region E are[x0, x1] and [y0, y1], as shown in FIG. 6(c), the horizontal scope[x_(0-ext), x_(1-ext)] of the extension region may be determined asfollows. For a point (x_(click-r), y_(click)) on the right of theclicked point P(x_(click), y_(click)) in the horizontal direction fromthe clicked point within the maximum extension region E wherex_(click)≦x_(click-r)≦x₁, a sliding window is set by taking the point asthe center, and the number of edge pixels in the sliding window iscounted. Then, the searching unit 511 may detect from left to right thefirst pixel satisfying a condition where the number of the edge pixelsin the sliding window is larger than a predetermined threshold, anddesignates the x coordinate of the detected pixel as x_(1-ext). As amatter of course, it is possible that no edge pixel is found up to theright boundary pixel of the maximum extension region E. In this case,the x coordinate of the right boundary pixel of the maximum extensionregion E may be designated as x_(1-ext).

Correspondingly, for a point (x_(click-1), y_(click)) on the left of theclicked point P(x_(click), y_(click)) in the horizontal direction fromthe clicked point within the maximum extension region E wherex₀≦x_(click-1)≦x_(click), a sliding window is set by taking the point asthe center, and the number of edge pixels in the sliding window iscounted. Then, the searching unit 512 may detect from right to left thefirst pixel satisfying a condition where the number of the edge pixelsin the sliding window is larger than a predetermined threshold, anddesignates the x coordinate of the detected pixel as x_(0-ext). As amatter of course, it is possible that no edge pixel is found up to theleft boundary pixel of the maximum extension region E. In this case, thex coordinate of the left boundary pixel of the maximum extension regionE may be designated as x_(0-ext).

Upon determination of the horizontal scope [x_(0-ext), x_(1-ext)] of theextension region, for each reference pixel (x, y_(click)) between theleft boundary pixel and the right boundary pixel in the horizontaldirection where x_(0-ext)≦x≦x_(1-ext), the vertical scope [y_(0-ext),y_(1-ext)] may be determined as follows. For a point (x, y_(up)) on theupper side of the reference point (x, y_(click)) in the verticaldirection from the reference point within the maximum extension region Ewhere y₀≦y_(up)≦y_(click), a sliding window is set by taking the pointas the center, and the number of edge pixels in the sliding window iscounted. Then, the searching unit 513 may detect from bottom to top thefirst pixel satisfying a condition where the number of the edge pixelsin the sliding window is larger than a predetermined threshold, anddesignates the y coordinate of the detected pixel as y_(0-ext). As amatter of course, it is possible that no edge pixel is found up to theupper boundary pixel of the maximum extension region E. In this case,the y coordinate of the upper boundary pixel of the maximum extensionregion E may be designated as y_(0-ext).

Correspondingly, for a point (x, y_(down)) on the lower side of thereference point (x, y_(click)) in the vertical direction from thereference point within the maximum extension region E wherey_(click)≦y_(down)≦y₁, a sliding window is set by taking the point asthe center, and the number of edge pixels in the sliding window iscounted. Then, the searching unit 514 may detect from top to bottom thefirst pixel satisfying a condition where the number of the edge pixelsin the sliding window is larger than a predetermined threshold, anddesignates the y coordinate of the detected pixel as y_(1-ext). As amatter of course, it is possible that no edge pixel is found up to thelower boundary pixel of the maximum extension region E. In this case,the y coordinate of the lower boundary pixel of the maximum extensionregion E may be designated as y_(1-ext). In this way, the extensionregion within the finger region F containing the clicked point P isobtained.

It is noted that in the technical solution described above, thehorizontal scope [x_(0-ext), x_(1-ext)] of the extension region isdetermined first; and then the vertical scope [y_(0-ext), y_(1-ext)] ofthe extension region is determined. However, the present disclosure isnot limited to this. For example, the vertical scope [y_(0-ext),y_(1-ext)] of the extension region may be determined first; and then thehorizontal scope [x_(0-ext), x_(1-ext)] of the extension region may bedetermined. The determination method thereof is similar to thosedescribed above, and thus omitted herein.

Upon obtaining the extension region within the finger region Fcontaining the clicked point P, the color model acquiring unit 520 mayacquire the color model of the finger image. For example, the colormodel of the finger image may be obtained by means of Gaussian MixtureModel, skin color threshold, histogram model with Bayes classifiers,etc. A specific exemplary method for obtaining the color model is givenbelow. Those skilled in the art shall understand that other methods thatare different from the specific exemplary method may also be used forobtaining the color model.

Multiple Gaussian models are used here because the finger color mayconsist of multiple color centers. Assuming any point in the extensionregion is represented as (x_(i), y_(i)) where 0≦i≦N−1, and N denotes thenumber of pixels in the extension region. The color characteristic ofeach point (x_(i), y_(i)) in the extension region may be represented asa two-dimensional vector f_(i)=(r′_(i), g′_(i)). r′_(i) and g′_(i) maybe calculated by:

$\begin{matrix}{r_{i}^{\prime} = \frac{r_{i}}{r_{i} + g_{i} + b_{i}}} & (4) \\{g_{i}^{\prime} = \frac{g_{i}}{r_{i} + g_{i} + b_{i}}} & (5)\end{matrix}$where r_(i), g_(i) and b_(i) denote r, g and b values of the pixel(x_(i), y_(i)), respectively.

In order to obtain multiple color centers, K-means Clustering algorithmmay be used to obtain K clusters.

In order to obtain multiple color centers, the K-means Clusteringalgorithm may be applied to the pixels in the extension region, so thatthe pixels in the extension region are clustered into K clusters (w_(i),C_(i)), where 0≦i≦K−1, and N is a natural number. Specifically, w_(i)denotes the weight of a cluster C_(i) and equals the ratio of the numberof pixels in the cluster C_(i) to the number of all the pixels in theextension region.

For each cluster C_(i), the pixels in the cluster are used to calculatea mean vector m_(i) and a covariance matrix S_(i) of the colorcharacteristics of the pixels clustered in the cluster as follows:

$\begin{matrix}{{\overset{\_}{m}}_{i} = {\frac{1}{{Num}_{i}}{\sum\limits_{i \in C_{i}}f_{i}}}} & (6) \\{S_{i} = {\frac{1}{{Num}_{i}}{\sum\limits_{i \in C_{i}}{\left( {f_{i} - {\overset{\_}{m}}_{i}} \right)\left( {f_{i} - {\overset{\_}{m}}_{i}} \right)^{T}}}}} & (7)\end{matrix}$where Num_(i) denotes the number of the pixels in the cluster C_(i).

Then, based on the mean vector m_(k) and the covariance matrix S_(k) ofthe color characteristics of the pixels in any cluster C_(k), theMahalanobis distance Ma−d(i,j,C_(k)) between the color characteristic ofeach pixel (i, j) in the extension region and any cluster C_(k) may becalculated by:Ma−d(i,j,C _(k))=(f _(i,j)− m _(k) )^(T) S _(k) ⁻¹(f _(i,j)− m _(k))  (8)

Further, based on the weight w_(k) of each cluster C_(k) in theextension region, a weighted Mahalanobis distance d(i, j) between thecolor characteristic of each pixel (i, j) in the extension region and Kclusters may be calculated by:

$\begin{matrix}{{d\left( {i,j} \right)} = {{\sum\limits_{k = 0}^{K - 1}{w_{k}*{Ma}}} - {d\left( {i,j,C_{k}} \right)}}} & (9)\end{matrix}$

Furthermore, a predetermined threshold which causes the ratio of thenumber of pixels having a weighted Mahalanobis distance smaller than thepredetermined threshold to the number of all the pixels in the extensionregion to be equal to a setting ratio may be determined as the colorthreshold T_(color).

Specifically, the distances d(i, j) of the pixels may be sorted fromsmallest to largest, and the color threshold may be selected accordingto a setting ratio ζ (e.g., 0.98). For example, the color threshold isselected such that the ratio of the number of pixels smaller than thepredetermined threshold to the number of all the pixels in the extensionregion is equal to the setting ratio ζ. Finally, the estimated colormodel includes K Gaussian models (w_(i) m_(i) , S_(i)) (0≦i≦K−1) and thecolor threshold T_(color).

As described above referring to FIG. 2, the object classifying unit 240may classify each pixel in the image I, based on the edge map of theimage I and the color model of the finger image, so as to obtain thebinary image of the image I.

Specifically, the object classifying unit 240 may classify pixels in theimage I that are non-edge pixels in the edge map and have a distancefrom the color model smaller than the color threshold as finger (object)pixels, and the other pixels in the image I as non-finger (non-object)pixels.

More specifically, for example, according to the estimated color modeland the enhanced edge map described above, the object classifying unit240 may classify each pixel (i, j) in the image I as follows. First, thecolor characteristic vector of the pixel (i, j) is calculated accordingto equations (4) and (5). Then, the distance between the pixel (i, j)and the color model is calculated according to equations (8) and (9).Finally, the pixel (i, j) is classified according to the equation (10):

$\begin{matrix}{{{Label}\left( {i,j} \right)} = \left\{ \begin{matrix}0 & {{{if}\mspace{14mu}{{Edge}_{enhance}\left( {i,j} \right)}} = {{255\mspace{14mu}{and}\mspace{14mu}{d\left( {i,j} \right)}} \leq T_{color}}} \\255 & {{{if}\mspace{14mu}{{Edge}\left( {i,j} \right)}} = {{0\mspace{14mu}{or}\mspace{14mu}{d\left( {i,j} \right)}} > T_{color}}}\end{matrix} \right.} & (10)\end{matrix}$where Edge_(enhance)(i, j) can be calculated by equation (3), and d(i,j) can be calculated by equation (9).

By these operations, the binary image of the image I including pixelswith values being 0 or 255 only may be obtained. Specifically, value 0shows that the pixel is closer to a finger pixel, while value 255 showsthat the pixel is closer to a non-finger pixel.

The detecting unit 700 of the image processing device according to anembodiment of the present disclosure is described below in conjunctionwith FIG. 7. The detecting unit 700 shown in FIG. 7 corresponds to thedetecting unit 250 shown in FIG. 2.

As shown in FIG. 7, the detecting unit 700 may include a noise removingunit 710 for removing noise component in the binary image.

Due to the variety of types of book contents, in the binary imageobtained by the object classifying unit, some non-finger pixels may beclassified as finger pixels, resulting in noise pixels. Therefore, it isnecessary to remove the noise pixels.

Specifically, the noise removing unit 710 may set a sliding window inthe binary image, and count the number of finger pixels (i.e., pixelswhose pixel values are 0) in the sliding window. If the number of fingerpixels in the sliding window is smaller than a predetermined threshold,it is determined that the finger pixels are actually noise pixels andthe pixels are set as non-finger pixels, i.e., the values of the pixelsare converted from 0 into 255.

Alternatively or additionally, the noise removal unit 710 may include aconnected component analyzing unit 711 and a pixel converting unit 712.The connected component analyzing unit 711 may perform connectedcomponent analysis (CCA) on the binary image, so as to obtain aconnected component in the binary image, each pixel in the connectedcomponent being a finger pixel. CCA algorithms are well-known in theprior art, and thus omitted herein.

For each obtained connected component, the pixel converting unit 712 mayconvert all the finger pixels in the connected component into non-fingerpixels if the connected component satisfies any of the conditions:

1) the area of the connected component is less than a predeterminedarea;

2) the aspect ratio of the connected component is larger than apredetermined ratio;

3) the finger image is on the left side of the image, and the distancebetween a left boundary of the connected component and a left boundaryof the image is larger than a predetermined threshold; or

4) the finger image is on the right side of the image, and the distancebetween a right boundary of the connected component and a right boundaryof the image is larger than the predetermined threshold.

The four conditions above are explained below. First, regardingcondition 1), the finger image takes a certain area; and when the areaof the connected component is too small, the connected component isunlikely to be the finger image, instead, it may be a noise component.Further, regarding condition 2), the finger image has a certain aspectratio. As shown in FIG. 8(a), when the aspect ratio is too large, theconnected component is more likely to be a noise component such as bookcontent T, and unlikely to be the finger image F1 or F2.

Further, regarding conditions 3) and 4), generally the finger is locatedon a vertical boundary of the image. When the connected component isaway from the vertical boundary and close to the middle of the image, itis unlikely to be the finger image. Instead, it may be a noisecomponent.

In addition, as shown in FIG. 7, the detecting unit 700 may furtherinclude a connected component processing unit 720 and a filling unit730. As shown in FIGS. 8(b), 8(c) and 8(d), the connected componentprocessing unit 720 may, according to the clicked point, acquire aconnected component F1 where the clicked point is located, and searchfor a nearby connected component F2 in a vertical direction. The fillingunit 730 may perform filling operation on the connected component F1containing the clicked point and the found connected component F2 (i.e.,region F′), thereby obtaining a filled connected component F″.

Considering that, during pixel classification, the finger image may beclassified into multiple separate parts (e.g., F1 and F2 shown in FIG.8(a) and FIG. 8(b)), the connected component F1 containing the clickedpoint is combined with the nearby connected component F2 in a verticaldirection from F1. Moreover, due to the possible holes in the detectedfinger image, the filling operation may be used to fill the holes.Specifically, for each column of the image I, the upper most and lowermost finger pixels (i.e., pixels whose pixel values are 0) are detected,and then all pixels between the two pixels are set as finger pixels.After the filling operation, the hole regions on the finger are filled,as shown in FIG. 8(d).

In addition, as shown in FIG. 7, the detecting unit 700 may furtherinclude an expanding unit 740 for performing an expanding operation onthe filled connected component in the binary image. As shown in FIG. 9,because the boundary of the finger image may not be contained in thedetected finger region A, it is necessary to perform an expandingoperation so as to expand the finger region A into a region A′. Specificmethods for the expanding operation are well-known in the prior art, andthe present disclosure has no particular limitations thereto.

Description is given above taking the finger image as an example.According to the embodiments of the present disclosure, both the colormodel of the finger image and the edge map of the image are used toobtain the binary image of the image. Further, both the information onthe clicked point and the edge map of the image are used to estimate thecolor model of the finger image. Therefore, the accuracy of detectingthe finger region can be greatly improved, thus facilitating removal ofthe finger image from the image and making the processed image morenice-looking.

The image processing method according to an embodiment of the presentdisclosure will be described hereinafter in conjunction with FIG. 10. Asshown in FIG. 10, the image processing method according to theembodiment of the present disclosure starts at step S110. In step S110,a click is performed on an object image contained in an image to obtaina clicked point.

Next, in step S120, an edge map of the image is calculated.

Next, in step S130, a color model of the object image is estimated basedon the clicked point and the edge map.

Next, in step S140, each pixel in the image is classified based on theedge map and the color model, so as to obtain a binary image of theimage.

Finally, in step S150, a region containing the object image is detectedbased on the binary image.

According to an embodiment of the present invention, in calculating theedge map of the image in step S120, the distance between the color ofeach pixel in the image and the color of the clicked point may becalculated to obtain a distance map. Then, a gradient operator may beapplied to the distance map to obtain a distance gradient image. If apixel in the image has a distance gradient larger than a predetermineddistance gradient threshold, the pixel is classified as an edge pixel;otherwise, the pixel is classified as a non-edge pixel.

According to an embodiment of the present invention, in calculating theedge map of the image in step S120, the distance between the color ofeach pixel in the image and the color of the clicked point may becalculated to obtain a distance map. Then, a gradient operator may beapplied to the distance map to obtain a distance gradient image.Further, the image may be converted from a color image into a grayimage, and a gradient operator may be applied to the gray image toobtain an intensity gradient image. If a pixel in the image has adistance gradient larger than a predetermined distance gradientthreshold or has an intensity gradient larger than a predeterminedintensity gradient threshold, the pixel is classified as an edge pixel;otherwise, the pixel is classified as a non-edge pixel.

According to an embodiment of the present invention, in estimating thecolor model of the object in step S130, an extension region containingthe clicked point may be acquired based on the clicked point and theedge map, the extension region being within the object image. Then, thecolor model of the object image may be acquired based on a color of eachpixel within the extension region.

Specifically, in acquiring the extension region containing the clickedpoint, a maximum extension region containing the clicked point may beset. Then, the first one of boundary pixels leftward in a horizontaldirection from the clicked point may be searched for, as a left boundarypixel of the extension region; and the first one of the boundary pixelsrightward in the horizontal direction from the clicked point may besearched for, as a right boundary pixel of the extension region.

Further, for each reference pixel between the left boundary pixel andthe right boundary pixel in the horizontal direction, the first one ofthe boundary pixels upward in a vertical direction from the referencepixel may be searched for, as an upper boundary pixel of the extensionregion; and the first one of the boundary pixels downward in thevertical direction from the reference pixel may be searched for, as anlower boundary pixel of the extension region.

Specifically, for each pixel within the maximum extension region, asliding window is set taking the pixel as the center, the number of edgepixels in the sliding window is counted, and a pixel satisfying acondition that the number of the edge pixels in the sliding window islarger than a predetermined threshold is defined as a boundary pixel.

According to an embodiment of the present disclosure, in classifyingeach pixel in the image in step S140, if a pixel in the image is anon-edge pixel in the edge map and has a distance from the color modelless than a color threshold, the pixel is classified as an object pixel;otherwise, the pixel is classified as a non-object pixel.

According to an embodiment of the present disclosure, in detecting theregion containing the object image in step S150, a noise component inthe binary image may be removed.

Specifically, in removing the noise component in the binary image,connected component analysis may be performed on the binary image, so asto obtain a connected component in the binary image, each of pixels inthe connected component being an object pixel. And each object pixel inthe connected component is converted into a non-object pixel if theconnected component satisfies any of the conditions of:

1) the area of the connected component being less than a predeterminedarea;

2) the aspect ratio of the connected component being larger than apredetermined ratio;

3) the object image being on the left side of the image and the distancebetween a left boundary of the connected component and a left boundaryof the image being larger than a predetermined threshold; or

4) the object image being on the right side of the image and thedistance between a right boundary of the connected component and a rightboundary of the image being larger than the predetermined threshold.

According to an embodiment of the present disclosure, in detecting theregion containing the object image in step S150, a connected componentwhere the clicked point is located may be acquired according to theclicked point, and a nearby connected component is searched for in avertical direction. Then, a filling operation may be performed on theconnected component containing the clicked point and the found connectedcomponent, thereby obtaining a filled connected component.

According to an embodiment of the present disclosure, in detecting theregion containing the object image in step S150, an expanding operationmay further be performed on the filled connected component in the binaryimage.

The various specific implementations of the respective steps above ofthe image processing method according to the embodiments of the presentdisclosure have been described in detail previously, and therefore theexplanations thereof will not be repeated herein.

Apparently, respective operating processes of the image processingmethod above according to the present disclosure can be implemented in amanner of a computer executable program stored on a machine-readablestorage medium.

And, the object of the present disclosure can be implemented in a mannerthat the storage medium on which the computer executable program aboveis carried is provided directly or indirectly to a system or apparatus,a computer or a Central Processing Unit (CPU) of which reads out andexecutes the computer executable program. Here, the implementation ofthe present disclosure is not limited to a program as long as the systemor apparatus has a function to execute the program, and the program canbe in arbitrary forms such as an objective program, a program executedby an interpreter, a script program provided to an operating system,etc.

The machine-readable storage medium mentioned above includes, but is notlimited to, various memories and storage devices, a semiconductordevice, a disk unit such as an optic disk, a magnetic disk and amagneto-optic disk, and other medium suitable for storing information.

Additionally, the present disclosure can also be implemented byconnecting to a corresponding web site on the Internet through acomputer, downloading and installing the computer executable programaccording to the invention into the computer, and then executing theprogram.

FIG. 11 is a block diagram illustrating an exemplary structure of ageneral-purpose personal computer on which the image processing deviceand method according to the embodiments of the present disclosure can beimplemented.

As shown in FIG. 11, a CPU 1301 executes various processing according toa program stored in a Read Only Memory (ROM) 1302 or a program loaded toa Random Access Memory (RAM) 1303 from a storage device 1308. In the RAM1303, if necessary, data required for the CPU 1301 in executing variousprocessing and the like is also stored. The CPU 1301, the ROM 1302 andthe RAM 1303 are connected to each other via a bus 1304. An input/outputinterface 1305 is also connected to the bus 1304.

The following components are connected to the input/output interface1305: an input device 1306 including a keyboard, a mouse and the like,an output device 1307 including a display such as a Cathode Ray Tube(CRT) and a Liquid Crystal Display (LCD), a speaker and the like, thestorage device 1308 including a hard disk and the like, and acommunication device 1309 including a network interface card such as aLAN card, a modem and the like. The communication device 1309 performscommunication processing via a network such as the Internet. Ifnecessary, a drive 1310 can also be connected to the input/outputinterface 1305. A removable medium 1311 such as a magnetic disk, anoptical disk, a magneto-optical disk, a semiconductor memory and thelike is mounted on the drive 1310 as necessary such that a computerprogram read out therefrom is installed in the storage device 1308.

In a case that the series of processing above is implemented insoftware, a program constituting the software is installed from thenetwork such as the Internet or the storage medium such as the removablemedium 1311.

It is understood by those skilled in the art that the storage medium isnot limited to the removable medium 1311 shown in FIG. 11 in which theprogram is stored and which is distributed separately from the device soas to provide the program to the user. Examples of the removable medium1311 include a magnetic disk including a Floppy Disk (registeredtrademark), an optical disk including a Compact Disk Read Only Memory(CD-ROM) and a Digital Versatile Disc (DVD), a magneto-optical diskincluding a MiniDisc (MD) (registered trademark), and a semiconductormemory. Alternatively, the storage medium may be the ROM 1302, the harddisk contained in the storage device 1308 or the like. Herein, theprogram is stored in the storage medium, and the storage medium isdistributed to the user together with the device containing the storagemedium.

In the system and method of the present disclosure, it is obvious thatrespective components or steps can be decomposed and/or recombined. Suchdecomposition and/or recombination should be considered as an equivalentsolution of the present disclosure. And, the steps performing a seriesof processing above can be performed in the describing order naturally,but this is not necessary. Some steps can be performed concurrently orindependently with one another.

Although the embodiment of the present disclosure has been described indetail in combination with the drawings above, it should be understoodthat, the embodiment described above is only used to explain theinvention and is not constructed as the limitation to the presentdisclosure. For those skilled in the art, various modification andalternation can be made to the above embodiment without departing fromthe essential and scope of the present disclosure. Therefore, the scopeof the present disclosure is only defined by the appended claims and theequivalents thereof.

The present disclosure discloses the embodiments described above as wellas the following appendix:

APPENDIX 1

An image processing device comprising:

an inputting unit for performing a click on an object image contained inan image to obtain a clicked point;

a calculating unit for calculating an edge map of the image;

an estimating unit for estimating a color model of the object imagebased on the clicked point and the edge map;

an object classifying unit for classifying each pixel in the image,based on the edge map and the color model, so as to obtain a binaryimage of the image; and

a detecting unit for detecting a region containing the object imagebased on the binary image.

APPENDIX 2

The device according to Appendix 1, wherein the calculating unitcomprises:

a distance calculating unit for calculating a distance between a colorof each pixel in the image and a color of the clicked point to obtain adistance map;

a distance gradient calculating unit for applying a gradient operator tothe distance map to obtain a distance gradient image; and

an edge classifying unit for classifying a pixel having a distancegradient larger than a predetermined distance gradient threshold in theimage into an edge pixel, and the other pixel in the image into anon-edge pixel.

APPENDIX 3

The device according to Appendix 1, wherein the calculating unitcomprises:

a distance calculating unit for calculating a distance between a colorof each pixel in the image and a color of the clicked point to obtain adistance map;

a distance gradient calculating unit for applying a gradient operator tothe distance map to obtain a distance gradient image;

a gray converting unit for converting the image from a color image to agray image;

an intensity gradient calculating unit for applying a gradient operatorto the gray image to obtain an intensity gradient image; and

an edge classifying unit for classifying a pixel having a distancegradient larger than a predetermined distance gradient threshold orhaving an intensity gradient larger than a predetermined intensitygradient threshold in the image into an edge pixel, and the other pixelin the image into a non-edge pixel.

APPENDIX 4

The device according to Appendix 1, wherein the estimating unitcomprises:

an extension region acquiring unit for acquiring an extension regioncontaining the clicked point based on the clicked point and the edgemap, the extension region being within the object image; and

a color model acquiring unit for acquiring the color model of the objectimage based on a color of each pixel within the extension region.

APPENDIX 5

The device according to Appendix 4, wherein the extension regionacquiring unit comprises:

a setting unit for setting a maximum extension region containing theclicked point;

a first searching unit for searching, as a left boundary pixel of theextension region, the first one of boundary pixels leftward in ahorizontal direction from the clicked point;

a second searching unit for searching, as a right boundary pixel of theextension region, the first one of the boundary pixels rightward in thehorizontal direction from the clicked point;

a third searching unit for searching, for each reference pixel betweenthe left boundary pixel and the right boundary pixel in the horizontaldirection, as an upper boundary pixel of the extension region, the firstone of the boundary pixels upward in a vertical direction from thereference pixel; and

a fourth searching unit for searching, as an lower boundary pixel of theextension region, the first one of the boundary pixels downward in thevertical direction from the reference pixel, wherein,

the extension region acquiring unit sets a sliding window taking eachpixel within the maximum extension region as a center, counts the numberof edge pixels in the sliding window, and defines a pixel satisfying acondition that the number of the edge pixels in the sliding window islarger than a predetermined threshold as the boundary pixel.

APPENDIX 6

The device according to Appendix 1, wherein the object classifying unitclassifies a pixel in the image which is a non-edge pixel in the edgemap and a distance from the color model is less than a color thresholdinto an object pixel, and the other pixel in the image into a non-objectpixel.

APPENDIX 7

The device according to Appendix 1, wherein the detecting unit comprisesa noise removing unit for removing noise component in the binary image.

APPENDIX 8

The device according to Appendix 7, wherein the noise removing unitcomprises:

a connected component analyzing unit for performing connected componentanalysis algorithm on the binary image, so as to obtain a connectedcomponent in the binary image, each of pixels in the connected componentbeing an object pixel; and

a pixel converting unit for converting each object pixel in theconnected component into a non-object pixel if the connected componentsatisfies any of conditions of:

an area of the connected component being less than a predetermined area;

an aspect ratio of the connected component being larger than apredetermined ratio;

the object image being on the left side of the image and a distancebetween a left boundary of the connected component and a left boundaryof the image being larger than a predetermined threshold; or

the object image being on the right side of the image and a distancebetween a right boundary of the connected component and a right boundaryof the image being larger than the predetermined threshold.

APPENDIX 9

The device according to Appendix 8, wherein the detecting unit furthercomprises:

a connected component processing unit for acquiring a connectedcomponent where the clicked point locates according to the clicked pointand searching a nearby connected component in a vertical direction; and

a filling unit for performing filling operation on the connectedcomponent containing the clicked point and the searched connectedcomponent, so as to obtain the filled connected component.

APPENDIX 10

The device according to Appendix 9, wherein the detecting unit furthercomprises:

an expanding unit for performing an expanding operation on the filledconnected component in the binary image.

APPENDIX 11

The device according to Appendix 1, wherein the object image is a fingerimage.

APPENDIX 12

The device according to Appendix 1, wherein the color of the clickedpoint is the color of a pixel at the clicked point, or an average colorof pixels within a predetermined region containing the clicked point.

APPENDIX 13

An image processing method comprising:

performing a click on an object image contained in an image to obtain aclicked point;

calculating an edge map of the image;

estimating a color model of the object image based on the clicked pointand the edge map;

classifying each pixel in the image, based on the edge map and the colormodel, so as to obtain a binary image of the image; and

detecting a region containing the object image based on the binary image

APPENDIX 14

The method according to Appendix 13, wherein the step of calculating anedge map of the image comprises:

calculating a distance between a color of each pixel in the image and acolor of the clicked point to obtain a distance map;

applying a gradient operator to the distance map to obtain a distancegradient image; and

classifying a pixel having a distance gradient larger than apredetermined distance gradient threshold in the image into an edgepixel, and the other pixel in the image into a non-edge pixel.

APPENDIX 15

The method according to Appendix 13, wherein the step of calculating anedge map of the image comprises:

calculating a distance between a color of each pixel in the image and acolor of the clicked point to obtain a distance map;

applying a gradient operator to the distance map to obtain a distancegradient image;

converting the image from a color image to a gray image;

applying a gradient operator to the gray image to obtain an intensitygradient image; and

classifying a pixel having a distance gradient larger than apredetermined distance gradient threshold or having an intensitygradient larger than a predetermined intensity gradient threshold in theimage into an edge pixel, and the other pixel in the image into anon-edge pixel.

APPENDIX 16

The method according to Appendix 13, wherein the step of estimating acolor model of the object image based on the clicked point and the edgemap comprises:

acquiring an extension region containing the clicked point based on theclicked point and the edge map, the extension region being within theobject image; and

acquiring the color model of the object image based on a color of eachpixel within the extension region.

APPENDIX 17

The method according to Appendix 16, wherein the step of acquiring anextension region containing the clicked point based on the clicked pointand the edge map comprises:

setting a maximum extension region containing the clicked point;

searching, as a left boundary pixel of the extension region, the firstone of boundary pixels leftward in a horizontal direction from theclicked point;

searching, as a right boundary pixel of the extension region, the firstone of the boundary pixels rightward in the horizontal direction fromthe clicked point; and

setting, for each reference pixel between the left boundary pixel andthe right boundary pixel in the horizontal direction, an upper boundarypixel and a lower boundary pixel of the extension region by steps of:

searching, as the upper boundary pixel of the extension region, thefirst one of the boundary pixels upward in a vertical direction from thereference pixel; and

searching, as the lower boundary pixel of the extension region, thefirst one of the boundary pixels downward in the vertical direction fromthe reference pixel, wherein,

a sliding window is set taking each pixel within the maximum extensionregion as a center, the number of edge pixels in the sliding window iscounted, and a pixel satisfying a condition that the number of the edgepixels in the sliding window is larger than a predetermined threshold isdefined as the boundary pixel.

APPENDIX 18

The method according to Appendix 13, wherein the step of classifyingeach pixel in the image based on the edge map and the color model so asto obtain a binary image of the image comprises:

classifying a pixel in the image which is a non-edge pixel in the edgemap and a distance from the color model is less than a color thresholdinto an object pixel, and the other pixel in the image into a non-objectpixel.

APPENDIX 19

A program product comprising a machine-readable instruction code storedtherein, wherein the instruction code, when read and executed by acomputer, enables the computer to execute the method according to any ofAppendixes 13-18.

APPENDIX 20

A machine-readable medium on which the program product according toAppendix 19 is carried.

The invention claimed is:
 1. An image processing device comprising aprocessor configured to: perform a click on an object image contained inan image to obtain a clicked point; calculate an edge map of the image;a color model of the object image based on the clicked point and theedge map; classify each pixel in the image, based on the edge map andthe color model, so as to obtain a binary image of the image; and aregion containing the object image based on the binary image, whereinthe processor is further configured to acquire an extension regioncontaining the clicked point based on the clicked point and the edgemap, the extension region being within the object image; and acquire thecolor model of the object image based on a color of each pixel withinthe extension region, wherein the processor is further configured to:set a maximum extension region containing the clicked point, search, asa left boundary pixel of the extension region, the first one of boundarypixels leftward in a horizontal direction from the clicked point,search, as a right boundary pixel of the extension region, the first oneof the boundary pixels rightward in the horizontal direction from theclicked point, search, for each reference pixel between the leftboundary pixel and the right boundary pixel in the horizontal direction,as an upper boundary pixel of the extension region, the first one of theboundary pixels upward in a vertical direction from the reference pixel;and search, as an lower boundary pixel of the extension region, thefirst one of the boundary pixels downward in the vertical direction fromthe reference pixel, wherein the processor is further configured to seta sliding window taking each pixel within the maximum extension regionas a center, count the number of edge pixels in the sliding window, anddefine a pixel satisfying a condition that the number of the edge pixelsin the sliding window is larger than a predetermined threshold as theboundary pixel.
 2. The device according to claim 1, wherein theprocessor is further configured to: calculate a distance between a colorof each pixel in the image and a color of the clicked point to obtain adistance map; a gradient operator to the distance map to obtain adistance gradient image; and classify a pixel having a distance gradientlarger than a predetermined distance gradient threshold in the imageinto an edge pixel, and the other pixel in the image into a non-edgepixel.
 3. The device according to claim 1, wherein the processor isfurther configured to: calculate a distance between a color of eachpixel in the image and a color of the clicked point to obtain a distancemap; apply a gradient operator to the distance map to obtain a distancegradient image; convert the image from a color image to a gray image;apply a gradient operator to the gray image to obtain an intensitygradient image; and classify a pixel having a distance gradient largerthan a predetermined distance gradient threshold or having an intensitygradient larger than a predetermined intensity gradient threshold in theimage into an edge pixel, and the other pixel in the image into anon-edge pixel.
 4. The device according to claim 1, wherein theprocessor is further configured to classify a pixel in the image whichis a non-edge pixel in the edge map and a distance from the color modelis less than a color threshold into an object pixel, and the other pixelin the image into a non-object pixel.
 5. The device according to claim1, wherein the processor is further configured to remove noise componentin the binary image.
 6. The device according to claim 5, wherein theprocessor is further configured to: perform connected component analysisalgorithm on the binary image, so as to obtain a connected component inthe binary image, each of pixels in the connected component being anobject pixel; and convert each object pixel in the connected componentinto a non-object pixel if the connected component satisfies any ofconditions of: an area of the connected component being less than apredetermined area; an aspect ratio of the connected component beinglarger than a predetermined ratio; the object image being on the leftside of the image and a distance between a left boundary of theconnected component and a left boundary of the image being larger than apredetermined threshold; or the object image being on the right side ofthe image and a distance between a right boundary of the connectedcomponent and a right boundary of the image being larger than thepredetermined threshold.
 7. The device according to claim 6, wherein theprocessor is further configured to: acquire a connected component wherethe clicked point locates according to the clicked point and search anearby connected component in a vertical direction; and perform fillingoperation on the connected component containing the clicked point andthe searched connected component, so as to obtain the filled connectedcomponent.
 8. The device according to claim 7, wherein the processor isfurther configured to: perform an expanding operation on the filledconnected component in the binary image.
 9. The device according toclaim 1, wherein the object image is a finger image.
 10. The deviceaccording to claim 1, wherein the color of the clicked point is thecolor of a pixel at the clicked point, or an average color of pixelswithin a predetermined region containing the clicked point.
 11. An imageprocessing method comprising: performing a click on an object imagecontained in an image to obtain a clicked point; calculating an edge mapof the image; estimating a color model of the object image based on theclicked point and the edge map; classifying each pixel in the image,based on the edge map and the color model, so as to obtain a binaryimage of the image; and detecting a region containing the object imagebased on the binary image, wherein the step of estimating a color modelof the object image based on the clicked point and the edge mapcomprises: acquiring an extension region containing the clicked pointbased on the clicked point and the edge map, the extension region beingwithin the object image; and acquiring the color model of the objectimage based on a color of each pixel within the extension region,wherein the step of acquiring an extension region containing the clickedpoint based on the clicked point and the edge map comprises: setting amaximum extension region containing the clicked point; searching, as aleft boundary pixel of the extension region, the first one of boundarypixels leftward in a horizontal direction from the clicked point;searching, as a right boundary pixel of the extension region, the firstone of the boundary pixels rightward in the horizontal direction fromthe clicked point; and setting, for each reference pixel between theleft boundary pixel and the right boundary pixel in the horizontaldirection, an upper boundary pixel and a lower boundary pixel of theextension region by steps of: searching, as the upper boundary pixel ofthe extension region, the first one of the boundary pixels upward in avertical direction from the reference pixel; and searching, as the lowerboundary pixel of the extension region, the first one of the boundarypixels downward in the vertical direction from the reference pixel,wherein, a sliding window is set taking each pixel within the maximumextension region as a center, the number of edge pixels in the slidingwindow is counted, and a pixel satisfying a condition that the number ofthe edge pixels in the sliding window is larger than a predeterminedthreshold is defined as the boundary pixel.
 12. The method according toclaim 11, wherein the step of calculating an edge map of the imagecomprises: calculating a distance between a color of each pixel in theimage and a color of the clicked point to obtain a distance map;applying a gradient operator to the distance map to obtain a distancegradient image; and classifying a pixel having a distance gradientlarger than a predetermined distance gradient threshold in the imageinto an edge pixel, and the other pixel in the image into a non-edgepixel.
 13. The method according to claim 11, wherein the step ofcalculating an edge map of the image comprises: calculating a distancebetween a color of each pixel in the image and a color of the clickedpoint to obtain a distance map; applying a gradient operator to thedistance map to obtain a distance gradient image; converting the imagefrom a color image to a gray image; applying a gradient operator to thegray image to obtain an intensity gradient image; and classifying apixel having a distance gradient larger than a predetermined distancegradient threshold or having an intensity gradient larger than apredetermined intensity gradient threshold in the image into an edgepixel, and the other pixel in the image into a non-edge pixel.
 14. Themethod according to claim 11, wherein the step of classifying each pixelin the image based on the edge map and the color model so as to obtain abinary image of the image comprises: classifying a pixel in the imagewhich is a non-edge pixel in the edge map and a distance from the colormodel is less than a color threshold into an object pixel, and the otherpixel in the image into a non-object pixel.
 15. A non-transitorycomputer-readable storage medium stored a computer program, the programcomprising instruction code readable and executable by a computer toenables the computer to execute the method according to claim 11.